﻿
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Windy
{
    internal class WindyScreen
    {
        private const int ScaleToScreen = 4; // 1/x 

        public Screen ParentScreen { get; private set; }

        public ScreenTilesForm TilesForm { get; private set; }

        
        public WindyScreen(Screen screen)
        {
            this.ParentScreen = screen;


            int width = screen.Bounds.Width / ScaleToScreen;
            int height = screen.Bounds.Height / ScaleToScreen;
            int startX = screen.WorkingArea.Location.X + (screen.Bounds.Width / 2 - width / 2);
            int startY = screen.WorkingArea.Location.Y + (screen.Bounds.Height / 2 - height / 2);

            this.TilesForm = new ScreenTilesForm(screen);
            this.TilesForm.Size = new Size(width, height);

            this.TilesForm.Location = new Point(startX, startY);
        }

        public void ShowOnTop()
        {
            this.TilesForm.ShowOnTop();
            //this.TilesForm.Activate();
        }
    }

}
